import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
//引入全局样式
import './assets/css/reset.css'
//引入vant组件
import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant);

Vue.config.productionTip = false

// 尝试从本地存储提取用户信息，并初始化状态机
let info = localStorage.getItem('userInfo')
if(info) {
  store.commit('users/infoMut',JSON.parse(info))
}

new Vue({
    router, //注入路由
    store, //注入状态机
    render: h => h(App)
}).$mount('#app')